<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page pageEncoding="UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <link href="${pageContext.request.contextPath}/bootstrap/css/main.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/ckeditor/ckeditor.js"></script>
    <script type="text/javascript">
        $(function(){
            var detail_editor = CKEDITOR.replace("newContent");
        })
    </script>
    <style>
        .r {
            margin-top: 20px;
            width: 80px;
            height: 35px;
            border: 1px solid #ddd;
            display: inline-block;
        }
        .t{
            margin-top: 7px;
        }
    </style>

</head>
<body>
<!-- 新闻管理 -->
    <div class="AccountManagement_c" id="NewsManagement_c">
        <!-- 路径导航 -->
        <ol class="breadcrumb">
            <li>首页</li>
            <li class="active">修改新闻</li>
        </ol>

        <h3>新闻管理</h3>
        <div class="list" id="release_news">
            <ul class="list_h">
                <li class="b80"><label>修改新闻</label></li>
            </ul>
            <div class="list_b_c" id="release_news_in" style="overflow-y: auto">
               <form action="updateNews" method="post" enctype="multipart/form-data">
                   <div class="release_news" >
                       <input type="hidden" name="id" value="${newsEntity.id}">
                       <input type="hidden" name="pageNum" value="${pageNum}">
                       <div class="news_title">
                           <label class="text_center">标题</label>
                           <input type="text" placeholder="填写标题" name="newsTitle" value="${newsEntity.title}">
                       </div>
                       <div class="news_title">
                           <label class="text_center">简单描述</label>
                           <input type="text" placeholder="填写新闻描述" name="newsDescr" value="${newsEntity.descr}">
                       </div>
                       <div class="news_title">
                           <label class="text_center">关键词</label>
                           <input type="text" placeholder="填写新闻关键词" name="newsKeyword" value="${newsEntity.keyword}">
                       </div>
                       <div class="news_title">
                           <label class="text_center">来源</label>
                           <input type="text" placeholder="填写新闻来源" name="newsSource" value="${newsEntity.source}">
                       </div>
                       <div class="r">
                           <label class="t">是否置顶</label>
                       </div>
                       <label class="radio-inline">
                           <input type="radio" name="isTop" id="inlineRadio1" value="1" <c:if test="${'1' eq newsEntity.top}">checked</c:if>> 是
                       </label>
                       <label class="radio-inline">
                           <input type="radio" name="isTop" id="inlineRadio2" value="0" <c:if test="${'0' eq newsEntity.top}">checked</c:if>> 否
                       </label><br>
                       <div class="r">
                           <label class="t">上传主图</label>
                       </div>
                       <input type="file" name="upload">
                       <div class="column_name">
                           <label class="text_center">栏目</label>
                           <select class="column_name_release" name="columnId">
                               <c:forEach items="${columnList}" var="column">
                                   <option value="${column.id}">${column.name}</option>
                               </c:forEach>
                           </select>
                       </div>
                       <textarea id="newContent"  name="newsContent">${newsEntity.detail}</textarea>
                       <div >
                           <button class="release_news_ok_btn text_center" type="submit">修改新闻</button>
                       </div>
                   </div>
               </form>
            </div>
        </div>
    </div>
</body>
</html>